
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO



CREATE PROCEDURE [dbo].[WordTemplateSelectAll]
	@OnlyVisible BIT
AS
BEGIN
	SELECT Id, Template, FileName, Description, DateCreated, Visible, Deleted 
	FROM WordTemplate 
	WHERE (@OnlyVisible = 0 AND Deleted = 0)
		OR (@OnlyVisible = 1 AND Visible = 1 AND Deleted = 0)
	ORDER BY FileName;
END


GO
